home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / doors / xpr / metaxpr.lha / Receive.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-22  |  556 b   |  33 lines

  1. #define __NO_PRAGMAS 1
  2.  
  3. #include "MetaXpr.h"
  4.  
  5. struct Library *MetaXprBase;
  6.  
  7. void
  8. main(int argc,char **argv)
  9. {
  10.     UBYTE    Name[256];
  11.     int    Error = -1;
  12.  
  13.     if(argc >= 2)
  14.     {
  15.         strcpy(Name,argv[1]);
  16.  
  17.         if(MetaXprBase = OpenLibrary("metaxpr.library",0))
  18.         {
  19.             if(!(Error = TransferSetup("serial.device",0,"xprzmodem.library",2400,8,1,0,0)))
  20.             {
  21.                 if(!(Error = TransferSetup("serial.device",0,"xprzmodem.library",2400,8,1,0,0)))
  22.                     ReceiveFile(Name,TRUE,NULL);
  23.             }
  24.             else
  25.                 printf("Error = %d\n",Error);
  26.  
  27.             CloseLibrary(MetaXprBase);
  28.         }
  29.     }
  30.  
  31.     exit(Error);
  32. }
  33.